﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class DataBase_Default : System.Web.UI.Page
{
    BO.News objRegistro;

    protected void Page_Load(object sender, EventArgs e)
    {

        if (Request.QueryString["id"] != null)
        {
            getDados();
        }
    }

    protected void getDados()
    {
        objRegistro = new BO.News();
        objRegistro.objVO.IdNews = int.Parse(Request.QueryString["id"]);

        DataSet ds = objRegistro.getRegistroById();
        lblTitulo.Text = ds.Tables[0].Rows[0][1].ToString();
        lblTexto.Text = ds.Tables[0].Rows[0][2].ToString();
        lblDataNews.Text = DateTime.Parse(ds.Tables[0].Rows[0][3].ToString()).ToShortDateString();

    }
}